package com.itheima.dao;

import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealDao {

    @Select("select * from t_setmeal where name like '%${queryString}%' or code like '%${queryString}%' or helpCode like '%${queryString}%'")
    List<Setmeal> findPage(@Param("queryString") String queryString);

    void add2Setmeal(Setmeal setmeal);

    @Insert("insert into t_setmeal_checkgroup values(#{setmealId},#{checkgroupId})")
    void add2Mid(@Param("setmealId") Integer setmealId,@Param("checkgroupId") int checkgroupId);


    @Select("select * from t_setmeal")
    List<Setmeal> getAllSetmeal();

    @Select("select * from t_setmeal where id = #{id}")
    Setmeal findById(int id);
    //就他一个男生。导游专业----初中物理老师
    // 东阳小学老师（15w）
}
